<?php
$status  = isset($info['status'])?$info['status']:'';
?>
<link rel="stylesheet" href="__PublicPlugins__/umeditor/themes/default/css/umeditor.min.css">
<div class="form-group ">
    <label class="col-lg-2 control-label" >标题</label>
    <div class="col-lg-3">
        <input type="text" value="{$info.title ?? ''}" class="form-control" name="title">
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >分类</label>
    <div class="col-lg-2 inline">
        <select class="form-control text" name="category_id">
            <option value="0">/</option>
            <?php echo isset($info['selectCategorys'])?$info['selectCategorys']:'';?>
        </select>
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >描述</label>
    <div class="col-lg-3">
        <input type="text" value="{$info.description ?? ''}" class="form-control" name="description">
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >封面</label>
    <div class="col-lg-3">
        <?php uploadWidget('cover_id') ?>
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >优先级</label>
    <div class="col-lg-3">
        <input type="text" value="{$info.level ?: 0}" class="form-control" name="level">
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >浏览量</label>
    <div class="col-lg-3">
        <input type="text" value="{$info.view ?: 0}" class="form-control" name="view">
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >评论数</label>
    <div class="col-lg-3">
        <input type="text" value="{$info.comment ?: 0}" class="form-control" name="comment">
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >点赞数</label>
    <div class="col-lg-3">
        <input type="text" value="{$info.liked?: 0}" class="form-control" name="liked">
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >状态</label>
    <div class="col-lg-3">
        <input type="radio" name="status" <?php echo empty($status)|$status==1?'checked':''?> value="1" checked> 显示
        <input type="radio" name="status" <?php echo $status === 0?'checked':''?>   value="0"> 隐藏
    </div>
</div>
<div class="form-group ">
    <label class="col-lg-2 control-label" >正文</label>
    <div class="col-lg-3">
        <!-- 加载编辑器的容器 -->
        <textarea id="container" name="content" type="text/plain" style="width:800px;height:200px;">{$info.hasOneArticleContent.content ?? ''}</textarea>
    <div class="col-lg-3">
</div>
<div class="form-group ">
    <div class="col-md-3 col-md-offset-2">
        <p class="help-block help-block-error">

        </p>
    </div>
</div>

<div class="form-actions">
    <a class="col-lg-2"> </a>
    <!--<button type="submit" class="btn btn-primary active" >保存</button>-->
    <button type="button" class="btn btn-primary ajax-post " autocomplete="off">
        保存
    </button>
    <a class="btn btn-default active" href="JavaScript:history.go(-1)">返回</a>
</div>
<script type="text/javascript" src="__PublicPlugins__/umeditor/third-party/template.min.js"></script>
<script type="text/javascript" src="__PublicPlugins__/umeditor/umeditor.config.js"></script>
<script type="text/javascript" src="__PublicPlugins__/umeditor/umeditor.js"></script>
<script type="text/javascript" src="__PublicPlugins__/umeditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    $(function(){
        var um = UM.getEditor('container');
    });
</script>


